package cs.ui250.carnatic;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.text.SpannableString;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class SongDialog extends Dialog {
	
	private Song mSong;
	
	public SongDialog(Context context, Song song) {
		super(context);
		mSong = song;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.song_popup);
		Button mCloseButton = (Button) findViewById(R.id.song_close_button);
		mCloseButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				dismiss();
			}
		});
		setTitle(mSong.getTitle());
		TextView mComposerText = (TextView) findViewById(R.id.song_composer_text);
		mComposerText.setText(mSong.getComposer());
		TextView mAudioText = (TextView) findViewById(R.id.song_audio_text);
		mAudioText.setText(mSong.getLink());
	}
}